//
//	GetComPanyCultureRootClass.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "GetComPanyCultureRootClass.h"

NSString *const kGetComPanyCultureRootClassCodeList = @"codeList";

@interface GetComPanyCultureRootClass ()
@end
@implementation GetComPanyCultureRootClass




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(dictionary[kGetComPanyCultureRootClassCodeList] != nil && [dictionary[kGetComPanyCultureRootClassCodeList] isKindOfClass:[NSArray class]]){
		NSArray * codeListDictionaries = dictionary[kGetComPanyCultureRootClassCodeList];
		NSMutableArray * codeListItems = [NSMutableArray array];
		for(NSDictionary * codeListDictionary in codeListDictionaries){
			GetComPanyCultureCodeList * codeListItem = [[GetComPanyCultureCodeList alloc] initWithDictionary:codeListDictionary];
			[codeListItems addObject:codeListItem];
		}
		self.codeList = codeListItems;
	}
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	if(self.codeList != nil){
		NSMutableArray * dictionaryElements = [NSMutableArray array];
		for(GetComPanyCultureCodeList * codeListElement in self.codeList){
			[dictionaryElements addObject:[codeListElement toDictionary]];
		}
		dictionary[kGetComPanyCultureRootClassCodeList] = dictionaryElements;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	if(self.codeList != nil){
		[aCoder encodeObject:self.codeList forKey:kGetComPanyCultureRootClassCodeList];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.codeList = [aDecoder decodeObjectForKey:kGetComPanyCultureRootClassCodeList];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	GetComPanyCultureRootClass *copy = [GetComPanyCultureRootClass new];

	copy.codeList = [self.codeList copyWithZone:zone];

	return copy;
}
@end